cmake_minimum_required(VERSION 3.14)

project(STM32F407BSP)

add_definitions(-D STM32F40_41xxx -D USE_STDPERIPH_DRIVER)
#add_definitions(-D DEBUG)
#add_definitions(-D RELEASE)

include_directories("./src/core/cmsis")
include_directories("./src/core/stm32")
include_directories("./src/lib")
include_directories("./src/lib/canopen")
include_directories("./src/bsp")
include_directories("./src/app")
include_directories("C:/Keil_v5/ARM/ARMCC/include")  # 这里是 Keil 编译器的路径默认安装就是这个值

file(GLOB files "./src/*/*.[ch]*" "./src/*/*/*.[ch]*" "./src/*/*/*/*.[ch]*")

add_executable(hello_cmake ${files})